﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFramework.Cache
{
    public interface ICacheProvider
    {
        /// <summary>
        /// 
        /// </summary>
        int DefaultExpireSeconds { get; }

        /// <summary>
        /// 
        /// </summary>
        string KeyPreFix { get; }

        /// <summary>
        /// 
        /// </summary>
        string Name { get; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <param name="obj"></param>
        void Insert(string key, object obj);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <param name="obj"></param>
        /// <param name="seconds"></param>
        void Insert(string key, object obj, int seconds);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <param name="obj"></param>
        /// <param name="dep"></param>
        void Insert(string key, object obj, CacheDependency dep);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object Get(string key);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        void Remove(string key);
    }
}
